package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * CgAgenteAduan generated by hbm2java
 */
@Entity
@Table(name = "CG_AGENTE_ADUAN", schema = "UPET")
public class CgAgenteAduan implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2118354478531223335L;
	private String nitagenteAduanal;
	private Integer nagenteAduanal;
	private String nitsociedad;
	private String nresolucion;
	private Date fifianza;
	private Date fffianza;
	private Integer ncorrelTramita;
	private Integer bstatus;
	private String cusuario;
	private Date fhingreso;
	private Date fhmodificacion;
	private Set<CgAgenteCaso> cgAgenteCasos = new HashSet<CgAgenteCaso>(0);

	public CgAgenteAduan() {
	}

	public CgAgenteAduan(String nitagenteAduanal, Integer nagenteAduanal,
			String nresolucion, Date fifianza, Date fffianza,
			Integer ncorrelTramita, Integer bstatus, String cusuario,
			Date fhingreso, Date fhmodificacion) {
		this.nitagenteAduanal = nitagenteAduanal;
		this.nagenteAduanal = nagenteAduanal;
		this.nresolucion = nresolucion;
		this.fifianza = fifianza;
		this.fffianza = fffianza;
		this.ncorrelTramita = ncorrelTramita;
		this.bstatus = bstatus;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
	}

	public CgAgenteAduan(String nitagenteAduanal, Integer nagenteAduanal,
			String nitsociedad, String nresolucion, Date fifianza,
			Date fffianza, Integer ncorrelTramita, Integer bstatus,
			String cusuario, Date fhingreso, Date fhmodificacion,
			Set<CgAgenteCaso> cgAgenteCasos) {
		this.nitagenteAduanal = nitagenteAduanal;
		this.nagenteAduanal = nagenteAduanal;
		this.nitsociedad = nitsociedad;
		this.nresolucion = nresolucion;
		this.fifianza = fifianza;
		this.fffianza = fffianza;
		this.ncorrelTramita = ncorrelTramita;
		this.bstatus = bstatus;
		this.cusuario = cusuario;
		this.fhingreso = fhingreso;
		this.fhmodificacion = fhmodificacion;
		this.cgAgenteCasos = cgAgenteCasos;
	}

	@Id
	@Column(name = "NIT_AGENTE_ADUANAL", unique = true, nullable = false, length = 14)
	public String getNitagenteAduanal() {
		return this.nitagenteAduanal;
	}

	public void setNitagenteAduanal(String nitagenteAduanal) {
		this.nitagenteAduanal = nitagenteAduanal;
	}

	@Column(name = "N_AGENTE_ADUANAL", nullable = false, precision = 5, scale = 0)
	public Integer getNagenteAduanal() {
		return this.nagenteAduanal;
	}

	public void setNagenteAduanal(Integer nagenteAduanal) {
		this.nagenteAduanal = nagenteAduanal;
	}

	@Column(name = "NIT_SOCIEDAD", length = 14)
	public String getNitsociedad() {
		return this.nitsociedad;
	}

	public void setNitsociedad(String nitsociedad) {
		this.nitsociedad = nitsociedad;
	}

	@Column(name = "N_RESOLUCION", nullable = false, length = 12)
	public String getNresolucion() {
		return this.nresolucion;
	}

	public void setNresolucion(String nresolucion) {
		this.nresolucion = nresolucion;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FI_FIANZA", nullable = false, length = 7)
	public Date getFifianza() {
		return this.fifianza;
	}

	public void setFifianza(Date fifianza) {
		this.fifianza = fifianza;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FF_FIANZA", nullable = false, length = 7)
	public Date getFffianza() {
		return this.fffianza;
	}

	public void setFffianza(Date fffianza) {
		this.fffianza = fffianza;
	}

	@Column(name = "N_CORREL_TRAMITA", nullable = false, precision = 5, scale = 0)
	public Integer getNcorrelTramita() {
		return this.ncorrelTramita;
	}

	public void setNcorrelTramita(Integer ncorrelTramita) {
		this.ncorrelTramita = ncorrelTramita;
	}

	@Column(name = "B_STATUS", nullable = false, precision = 1, scale = 0)
	public Integer getBstatus() {
		return this.bstatus;
	}

	public void setBstatus(Integer bstatus) {
		this.bstatus = bstatus;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "FH_INGRESO", nullable = false, length = 7)
	public Date getFhingreso() {
		return this.fhingreso;
	}

	public void setFhingreso(Date fhingreso) {
		this.fhingreso = fhingreso;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_MODIFICACION", nullable = false, length = 7)
	public Date getFhmodificacion() {
		return this.fhmodificacion;
	}

	public void setFhmodificacion(Date fhmodificacion) {
		this.fhmodificacion = fhmodificacion;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cgAgenteAduan")
	public Set<CgAgenteCaso> getCgAgenteCasos() {
		return this.cgAgenteCasos;
	}

	public void setCgAgenteCasos(Set<CgAgenteCaso> cgAgenteCasos) {
		this.cgAgenteCasos = cgAgenteCasos;
	}

}
